/**
 * 
 */
package com.gkwave.action.service;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.gkwave.module.bean.BoardingLocationBean;
import com.gkwave.module.dao.BoardingLocationDAO;

/**
 * @author Administrator
 *
 */
public class TransportLocationService extends BaseService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1258211229475749683L;

	/* (non-Javadoc)
	 * @see com.gkwave.action.service.BaseService#procesRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	@Override
	public void procesRequest(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
    	String idCity = request.getParameter("idCity");
    	BoardingLocationDAO dao = null;
    	BoardingLocationBean bean = null;
    	out = response.getWriter();
    	if(idCity!=null){
	    	try{
	    		Integer id_city = Integer.parseInt(idCity);
				dao = new BoardingLocationDAO();
				bean = dao.getLocationByCityID(id_city);
				xmlResponse = bean.marsel(bean);
	    	}catch (Exception e) {
				// TODO: handle exception
	    		e.printStackTrace();
			}
    	}
    	System.out.println(xmlResponse);
    	out.println(xmlResponse);
	}

}
